DOS Days

Building an MDA/CGA/EGA to VGA Converter - Pt.3

6th March, 2023

 

In Part 2, we built the Necroware MCE adapter which converts a digital video input signal to analogue and optionally combines the horizontal and vertical sync signals into a composite sync signal. In this Part 3 we'll get it connected and put it through its paces.

My Necroware MCE Adapter

The various jumpers on the board have the following meanings:

Jumper Meaning Settings
J1 Mono/Colour OFF = mono, ON = colour
J2 Mode select If J1=OFF, OFF=black & white, ON = green
If J1=ON, OFF = CGA/EGA low-res, ON=EGA high-res
J3 Invert composite sync ON = negative V-Sync, OFF = positive V-Sync
J4 Sync signal type 1-2 = Composite Sync, 2-3 = Separate H- and V-Sync

So to configure the adapter to be used with different graphics cards, the following should be used:

  J1 J2 J3 J4*
MDA/Hercules (black & white) OFF OFF ON 1-2
MDA/Hercules (green screen) OFF ON ON 1-2
CGA or EGA 640x200 16-colour ON OFF OFF 1-2
EGA 640x350 64-colour ON ON ON 1-2
*This is the sync setting if connecting the adapter's VGA output port to a GBS8200. If connecting directly to a multisync display this should always be set to separate H- and V-sync (2-3 jumpered).

 

Testing CGA

For the first set of tests I chose one of the FIDA CGA cards I reviewed last year:


One of my FIDA Hercules/CGA cards from 1988

Unfortunately, testing was initially not straightforward. Given that this adapter handles the conversion from digital to analogue, and has the option of either composite sync or separate horizontal and vertical syncs, it should work directly with a 15 kHz monitor, without the need to plug it into the GBS8200 first.

I connected the VGA output directly to my ViewSonic G75f multisync monitor but failed to realise that it doesn't accept horizontal frequencies lower than 30 kHz (remember VGA is 31 kHz and MDA, CGA and EGA are much lower). The display would just tell me "H.V FREQUENCY OVER RANGE". What I think it really meant was "UNDER RANGE", since the MCE Adapter configured in CGA mode outputs at 15.75 kHz - the MCE Adapter doesn't change the output frequency, so it will output at the same horizontal and vertical frequency as the input video signal.

So moving on without a compatible multisync monitor, I then switched to my Gefen VGA-to-DVI Scaler Plus, which I use for many screenshots and videos for this site. I double-checked the specs of the Gefen upscaler and confirmed that it supports horizontal frequencies in the range 15 - 70 kHz, and set the DIP switches on the CGA card to output positive vertical sync and negative horizontal sync, which is standard for CGA though the FIDA CGA card does allow for + and - syncs on both, which is great!). To match this, the MCE adapter was set with J1 jumpered, J2 and J3 not jumpered, and J4 set to separate H- and V-sync (as expected for VGA).

Strangely this also failed to work, reporting "Unsupported" on the virtual screen in OBS Studio (video capture app). The output from the scaler goes into an HDMI video capture dongle, so it could be this device that cannot support the screen resolution from the Gefen scaler, or it could be my modern HDMI monitor that doesn't.

After several frustrating hours of checking the circuit, rewriting the firmware to the PLD (this time with the 'Lock' and 'Encrypt' options unchecked) and verifying the contents matched my .JED file, this time I connected the adapter's VGA output to the input of the GBS8200 (with the MCE Adapter now set to composite sync output), and hey presto, it worked!


My main retro PC with the FIDA CGA card installed

Going forward, all testing for this article will have the MCE Adapter connected to the GBS8200, like this:


Lots of potential points of failure(!) -
the rightmost three aren't needed if you have a compatible multisync or 15 kHz arcade monitor.

 

Here are a bunch of screenshots of the CGA output running through my new MCE adapter:


4D Sports Driving / Stunts (Mindscape)

Grand Prix Circuit (Accolade)

Railroad Tycoon (Microprose)

Space Quest III: The Pirates of Pestulon (Sierra Online)

Budokan (Electronic Arts)

Arctic Adventure (Electronic Arts)

Prince of Persia (Broderbund Software)

Xenon 2: Megablast (The Bitmap Brothers)

Carrier Command (Realtime Games)

Battle Chess (Electronic Arts)

OK, not a bad start - the output quality is pretty good and colours appear to be fairly authentic. So far all of the tests are running either 320 x 200 graphics mode or 80 x 25 text mode. Battle Chess failed to display properly once in the game - I'm not sure why because the main game screen also runs at the standard CGA 4-colour 320 x 200 graphics mode.

To evaluate the CGA colour palette, here are a few shots of Infoplus and the CGA Compatibility Tester:

So far I'm impressed with this. The colour definitions are solid, including the IBM brown "hack".

 

Testing EGA

To check the EGA capabilities, I'm now going to use my Cirrus Logic CL-GD510/520 card, which has both a 9-pin port (digital TTL output for Hercules, CGA and EGA) and 15-pin port (for VGA), and is 100% hardware/register-level compatible with all earlier graphics standards - no emulation here like the majority of VGA cards, this thing's the real deal!

The card only seemed to work when I set the DIP switches to 'EGA locked' mode. Using other modes, I got some content on the display, but it soon became garbled, like the horizontal frequency was unsupported.

Here are some screenshots of it running:


Gold Rush! (Sierra Online)

4D Sports Driving / Stunts (Mindscape)


Their Finest Hour: Battle of Britain (Lucasfilm Games)


Grand Prix Circuit (Accolade)


Space Quest III: The Pirates of Pestulon (Sierra Online)


The Colonel's Bequest: Laura Bow (Sierra Online)

Jailbars are evident in some games like 4D Sports Driving (Stunts) and Their Finest Hour: Battle of Britain.
Here's Infoplus and the CGA Compatibility Tester again:

Testing Hercules/MDA

Setting the switches on the Cirrus Logic card to MGA (Hercules) failed to produce an image through the GBS8200. I tested all my other Hercules cards and they too failed to produce an image.

 

Conclusion

Right, so the Necroware MCE Adapter is working well up to a point, producing accurate colours and clear output with composite sync, though there is room for improvement. Here's a summary of what works and what doesn't:

Source Graphics Card To GBS8200 Direct to monitor Comments
Hercules/MDA No Untested Hercules and MDA use an H-Sync of 18.432 kHz - not supported by the GBS8200.
CGA Yes Untested Works perfectly connected to GBS8200.
EGA low-res (640 x 200) Yes Untested Works perfectly connected to GBS8200.
EGA high-res (640 x 350) Yes Untested Works perfectly connected to GBS8200.

For the Hercules/MDA to GBS8200 test, this was to be expected, as I mentioned in Part 1 that the MCE Adapter outputs at the same sync frequency as the incoming sync frequency - it does not change it. Furthermore, GBS8200 supports only 3 fixed horizontal frequency ranges: 14.5-16.5 kHz, 23.5-25.5 kHz and 30.5-32.5 kHz.

The 18 kHz of Hercules/MDA is not in these ranges, which is why it won't work with the GBS8200. All other CGA and EGA tests worked just fine with the GBS8200. As for taking the MCE Adapter's output direct into a multisync monitor, I cannot confirm these work as I don't have a monitor that supports horizontal sync frequencies below 30 kHz, and all of these operate at 21 kHz and lower. Having said that, I have no reason to think they wouldn't. The MCE Adapter gives you sufficient control over the H-sync type (positive or negative) and whether the output is composite or separate H and V, that with a monitor that can handle that frequency, it would work without issue.

In Part 4, the GBS8200 will be upgraded, bypassing the stock microcontroller with a much faster ESP8266 controller and GBS Control firmware.